<template>  
  <div class="formInput">
    <el-input
      :placeholder='placeholder'
      @blur='setData'
      v-model="inputVal"></el-input>      
  </div>
</template>

<script>
export default {
    props:{
        label:{
            type:String,
            default:''
        },
        placeholder:{
            type:String,
            default:''
        }
    },
    data() {
      return {
        inputVal: ''
      }
    },
    methods: {
      setData() {
        let obj = {}
        obj[this.label] = this.inputVal;
        this.$emit('setFormData', obj)
      }
    }
}
</script>

<style lang="less" scoped>

</style>